
import storage from '@/assets/utils/Storage'
const Storage = storage.storage;

export default {
	setToken:({ commit, dispatch, state}, {loadFirst = true, token}) => {
		commit("SET_TOKEN", token);
		Storage.setStorage('token',token)
	},
	setOpenId:({ commit, dispatch, state}, {loadFirst = true, openId}) => {
		commit("SET_OPENID", openId);
	},
	setUser:({ commit, dispatch, state}, {loadFirst = true, userInfo}) => {
		commit("SET_USER", userInfo);
	},
	setUcid:({ commit, dispatch, state}, {loadFirst = true, ucid}) =>{
		commit("SET_CUID", ucid)
	},
	setCity:({ commit, dispatch, state}, {loadFirst = true, cityInfo}) =>{
		commit("SET_CITY", cityInfo)
	},
	setPositionCity:({ commit, dispatch, state}, {loadFirst = true, cityInfo}) =>{
		commit("SET_POSITIONCITY", cityInfo)
	},
	setResumeStatus:({ commit, dispatch, state}, {loadFirst = true, status}) =>{
		commit("SET_RESUMESTATUS", status)
	},
	setUtm:({ commit, dispatch, state}, {loadFirst = true, utm}) =>{
		commit("SET_UTM", utm)
	},
	setIsWIfi(context, data) {
		let {commit} = context;
		commit('SET_ISWIFI', data)
	},
	setStoreInfo(context, data) {
		let {commit} = context;
		commit('SET_STOREINFO', data)
	}
}
